package Game;

//import java.awt.List;
import java.awt.Graphics2D;

public class Level03SInvaders extends Scene
{
	Background background;
	PlayerSInvaders player = new PlayerSInvaders(400, 500, 20, 20);
	

	public Level03SInvaders()
	{
		background = new Background (0,0,800,600);
		background.Load("/Imagens/background.png");
		
		
		for (int i  =0 ; i < ShotManagerSInvaders.tiro.size(); i++)
			ShotManagerSInvaders.tiro.remove(i);
		
		EnemyManagerSInvaders.Setup(12, 6, 3, 6);


		
	}

	@Override
	public void update(InputManager input) {
		EnemyManagerSInvaders.Update(ShotManagerSInvaders.tiro);
    	player.Update(input);
    	ShotManagerSInvaders.Update();
    	
    	if(EnemyManagerSInvaders.recs.size() == 0)
    	{
    		SceneManager.MudarCena();
    	}
	}

	@Override
	public void draw(Graphics2D g2d) {
		
		background.Draw(g2d);
		EnemyManagerSInvaders.Draw(g2d);
		player.Draw(g2d);
		
    	ShotManagerSInvaders.Draw(g2d);
    	ShotManagerSInvaders.DrawInm(g2d);		
	}
}
